#!/usr/bin/env python
import sys
from snmp_exporter.http import start_http_server

if __name__ == '__main__':
  if len(sys.argv) not in [2, 3]:
    print "Usage: snmp_exporter config_file [port]"
    sys.exit(1)

  if len(sys.argv) == 3:
    port = int(sys.argv[2])
  else:
    port = 9116

  start_http_server(sys.argv[1], port)

